<?/*

Here's an example of how you can pass variables at the end of a URL in order
to toggle conditionals inside your document. In this example we output different
messages based on the number of results returned in a mock search result:

"http://......./search.php?results=0" // produces 0 results
"http://......./search.php?results=10" // produces 10 results

*/
?>

<?$results = $_GET['results'] // Create a local variable from the one passed in the URL (if it's there!) ?>

<?if (!$results && $results !="0") {  // This is the default view of search.php, without the presence of any variables ?>
	<p>Welcome, and good luck with you search.</p>
<?}else if ($results == "0") {  // If there is a result of "0", also known as an "empty search" ?>	
	<p>Sorry, your search returned no results.</p>
<?}else if ($results > 0) {  // If there is at least 1 result ?>	
	<p>Your search returned <?print $results ?> result(s).</p> 
<?}?>


<?/*

Once we've fetched a variable from the URL we can continue to make use of it.
Here we'll use it to loop the number of results, assuming there are soeme.
This is a cheap and easy way of testing our layout against a variey of scenarios.

*/
?>

<? for ($i = 1; $i <= $results; $i++) { ?>
<h3><a href="article.php"><?glue_string("headline")?></a></h3>
<p><?glue_string("teaser")?></p>
<?}?>